const express = require('express')
      router = express.Router()

router.post('/answer',signIn,(req,res) =>{
	req.body.createTime = new Date()
	req.body.username = req.cookies.username
	req.body.ownerId = req.cookies.ownerId
	req.body.questionId = req.cookies.questionId
	var answer = new Answer(req.body)
		answer.save(function(err,data){
			if(err){
				send(res,'fail','系统错误')
			}else{
				send(res,'success',"回答成功")
			}
		})
})


module.exports = router